package com.doubletick.proxy.ipidea.domain;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.doubletick.common.annotation.Excel;
import com.doubletick.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 代理账号对象 t_proxy_account
 *
 * @author ruoyi
 * @date 2024-07-08
 */
@Data
@TableName("t_proxy_account")
public class ProxyAccount extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 代理id
     */
    @Excel(name = "代理id")
    private String proxyId;

    /**
     * 账号
     */
    @Excel(name = "账号")
    private String account;

    /**
     * 密码
     */
    @Excel(name = "密码")
    private String password;

    /**
     * 状态,0禁用,1正常
     */
    private String state;

    /**
     * 流量上限(M)
     */
    @Excel(name = "流量上限(M)")
    private String limitFlow;


    private String remark;

    private Date createTime;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    @TableField(exist = false)
    private String username;

    private BigDecimal consumedFlow;
}
